#-*- coding:utf-8 -*-


from selenium import webdriver
import time


driver = webdriver.Firefox(executable_path="D:\geckodriver\geckodriver.exe")
driver.maximize_window()
driver.get("https://www.jd.com")
key = driver.find_element_by_id("key")
button = driver.find_element_by_class_name("button")
key.send_keys(u"袜子")
button.click()
# 关闭浏览器
driver.quit()